<?php
/*$NoTrans=array('></embed>','width="725"');
$Trans=array('wmode="transparent" width="100%"></embed>','width="880"');*/
$NoTrans=array('width="725"');
$Trans=array('width="90%"');
/*if(empty($Event)){
$Search=" ORDER BY idActu DESC ";
}
else{
$Search="AND idActu='".$Event."'";
}*/
$reqLigne2=mysql_query("SELECT * FROM actualites WHERE MiseEnLigneActu='oui' $Search  LIMIT 1 ") or die(mysql_error());

$data2=mysql_fetch_assoc($reqLigne2);
	$idActu=$data2['idActu'];
	$ImageGarde=$data2['ImageGarde'];
	$BGActu=$data2['BGActu'];
	$TextArtG=$data2['TextArtG'];
	$TextArtD=$data2['TextArtD'];
	$LinkVideo=$data2['LinkVideo'];
	$FB=$data2['FB'];
	$Digi=$data2['Digi'];
	$Jour=$data2['Jour'];
	$Mois1=$data2['Mois'];
	$Mois=str_replace($NumMois, $LetterMois, $data2['Mois']);
	$NomJour=$data2['NomJour'];

?>
<div class="Contain" style="width:100%; background-color:<?php echo $BGActu; ?>; text-align:center;">

<?php
$Prev=mysql_query("SELECT * FROM actualites WHERE MiseEnLigneActu='oui' AND idActu < '$idActu' ORDER BY idActu DESC LIMIT 1") or die(mysql_error());
$nbP=mysql_num_rows($Prev);
$dataP=mysql_fetch_assoc($Prev);
$idPrev=$dataP['idActu'];
if($nbP>0){
?>
<div class="ArrowLeft"><a href="index.php?page=Home&event=<?php echo $idPrev; ?>&lang=<?php echo $lang; ?>"><img src="./images/ArrowLeft.png" height="120px"></a></div>
<?php } ?>
<?php
$Next=mysql_query("SELECT * FROM actualites WHERE MiseEnLigneActu='oui' AND idActu > '$idActu' LIMIT 1") or die(mysql_error());
$nbN=mysql_num_rows($Next);
$dataN=mysql_fetch_assoc($Next);
$idNext=$dataN['idActu'];
if($nbN>0){
?>
<div class="ArrowRight"><a href="index.php?page=Home&event=<?php echo $idNext; ?>&lang=<?php echo $lang; ?>"><img src="./images/ArrowRight.png" height="120px"></a></div>
<?php } ?>
	<div class="BGActu">
		<?php if(!empty($FB)){ ?>
		<div class="FB">
		<a href="<?php echo $FB; ?>" target="_blank"><img src="./images/FB.png" width="120%"></a>
		</div>
		<?php } ?>
	<div class="CacheBG"><img src="./../imagesBGEvents/<?php echo $ImageGarde; ?>"  width="140%"></div> </div>
	<div class="DJ">
		<div class="DJLeft"><?php echo $TextArtG; ?></div>
		<div class="DJRight"><?php echo $TextArtD; ?></div>
		<div class="clr"></div>
	</div>
	<?php if($MoisN==$Mois1 && $JourN<$Jour){ ?>
	<?php if(!empty($Digi)){ ?>
	<div class="Preventes">
	<a href="<?php echo $Digi; ?>" target="_blank"><img src="./images/Preventes.png" width="60%"></a>
	</div>
	<?php } 
	}?>
	<?php
	if(!empty($LinkVideo)){ ?>
	<div class="Videos"><?php echo str_replace($NoTrans, $Trans, $LinkVideo); ?></div>
	<?php } ?>
	<div class="Pics" style="background-color:<?php echo $BGActu; ?>;">
	<?php 
	$verifPhotos=mysql_query("SELECT idActu FROM photosactu  WHERE idActu='$idActu'") or die (mysql_error());
	$nbverifPhotos=mysql_num_rows($verifPhotos);
	if($nbverifPhotos>0){
	include('app/Photos.php'); 
	}
	?>
	</div>
	
</div>